fix(dashboard): resolve module resolution and build failures - #351
Merged
Lakes41 merged 1 commit intoAug 20, 2026
Merged
Conversation
Configure tsconfig path aliases for monorepo workspace packages. Update next.config.mjs transpilePackages to include metrics. Document build process and aliases setup.
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes the
Module not foundbuild errors inapps/dashboardwhen importing internal monorepo packages (like@guildpass/env). It resolves incorrect TypeScript path alias mappings that were causing Next.js to attempt to bundle.d.tsdeclaration files as runtime code, and updates the transpile settings to ensure all workspace packages are built correctly by the bundler.Linked Issue
Closes #341
Type of Change
Changes Made
apps/dashboard/tsconfig.json: Replaced explicit path aliases targeting.d.tsfiles with a dynamic@guildpass/*alias mapped to../../packages/*. This allows Node module resolution to properly link to thepackage.jsonmain/types fields and fixes the Next.js Webpack bundler crashes.apps/dashboard/next.config.mjs: Added@guildpass/metricstotranspilePackagesto ensure the dashboard properly transpiles the workspace package containing raw TypeScript source code.apps/dashboard/README.md: Added aSetup & Build Processsection to document the required build order, the purpose of the path aliases, and environment variable requirements for durable storage.Test Evidence
The production build and static page generation now complete cleanly without
Module not founderrors:Additionally,
pnpm typechecksuccessfully passes without raising module resolution failures.Checklist
pnpm typecheckpasses with no errorspnpm lintpasses (or issues are pre-existing and documented)pnpm testpasses (all existing tests still pass)pnpm dev:docs.env.exampleScreenshots / Recordings
N/A - Infrastructure and build pipeline fixes.
Additional Notes
.d.tspaths, ensuring robust compatibility with Next.js' App Router compilation in the monorepo context.